<div class="content-section" id="myContent" >
    <div class="title col-sm-12">
        <div class="col-sm-2">
            <span>{{title}}</span>
        </div>
        <div class="col-sm-10 pull-right">
            <button type="button"
                    class="pull-right"
                    pButton
                    (click)="goBack()"
                    icon="fa-close"
                    style="width: 30px"></button>
        </div>
    </div>
    <form [formGroup]="myForm" class="form-horizontal">
        <div class="form-group">
            <label class=" title-style col-sm-2 control-label text-align-left">基本信息</label>
        </div>
        <div class="form-group ">
            <label class="col-sm-2 control-label">
                <span ngClass="start_red">*</span>机柜列归属：
            </label>
            <div class="col-sm-10 ui-fluid-no-padding">
                <div class="col-sm-8 ui-fluid ui-fluid-no-padding">
                    <input type="text" pInputText
                           readonly
                           [(ngModel)]="cabinetObj.father"
                           formControlName="father"
                           class="form-control cursor_not_allowed"/>
                    <div class="ui-message ui-messages-error ui-corner-all" *ngIf="father">
                        <i class="fa fa-close"></i>
                        不能为空
                    </div>
                </div>
                <div class="col-sm-1 ui-fluid-no-padding ui-padding-10px btn-my">
                    <button  ngClass="ui-g-12 ui-fluid-no-padding" pButton type="button"  label="选择" (click)="show('cabinet')"></button>
                </div>
                <div  class="col-sm-1 ui-fluid-no-padding ui-padding-10px btn-my">
                    <button ngClass="ui-g-12 ui-fluid-no-padding" pButton type="button"  label="清空" (click)="clear('cabinet')"></button>
                </div>
            </div>
        </div>
        <div class="form-group ">
            <label class="col-sm-2 control-label">
                <span ngClass="start_red">*</span>机柜列名称：
            </label>
            <div class="col-sm-10 ui-fluid-no-padding">
                <div class="col-sm-11 ui-fluid ui-fluid-no-padding">
                    <input type="text" pInputText
                           name="department"
                           [(ngModel)]="cabinetObj.name"
                           formControlName="name"
                           class="form-control"/>
                    <div class="ui-message ui-messages-error ui-corner-all" *ngIf="name">
                        <i class="fa fa-close"></i>
                        不能为空
                    </div>
                </div>
            </div>
        </div>
        <div class="form-group ">
            <label class="col-sm-2 control-label">
                <span ngClass="start_red">*</span>规划功率(Kw)：
            </label>
            <div class="col-sm-4 ui-fluid-no-padding ui-fluid">
                <input type="number"
                       class=" form-control"
                       pInputText
                       [(ngModel)]="cabinetObj.planning_power"
                       formControlName="planning_power"/>
                <div class="ui-message ui-messages-error ui-corner-all" *ngIf="planning_power">
                    <i class="fa fa-close"></i>
                    不能为空
                </div>
            </div>
            <label class="col-sm-2 control-label">
                <span ngClass="start_red">*</span>规划机架位(个)：</label>
            <div class="col-sm-4 ui-fluid-no-padding">
                <input type="number"
                       class=" form-control"
                       pInputText
                       [(ngModel)]="cabinetObj.planning_rack"
                       formControlName="planning_rack"/>
                <div class="ui-message ui-messages-error ui-corner-all" *ngIf="planning_rack">
                    <i class="fa fa-close"></i>
                    不能为空
                </div>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">
                <span ngClass="start_red">*</span>规划PDU电口(个)：</label>
            <div class="col-sm-4 ui-fluid-no-padding ui-fluid">
                <input type="number"
                       class=" form-control"
                       pInputText
                       [(ngModel)]="cabinetObj.planning_pdu"
                       formControlName="planning_pdu"/>
                <div class="ui-message ui-messages-error ui-corner-all" *ngIf="planning_pdu">
                    <i class="fa fa-close"></i>
                    不能为空
                </div>
            </div>
            <label class="col-sm-2 control-label">
                <span ngClass="start_red">*</span>规划网口数量(个)：</label>
            <div class="col-sm-4 ui-fluid-no-padding">
                <input type="number"
                       class=" form-control"
                       pInputText
                       [(ngModel)]="cabinetObj.planning_network_port"
                       formControlName="planning_network_port"/>
                <div class="ui-message ui-messages-error ui-corner-all" *ngIf="planning_network_port">
                    <i class="fa fa-close"></i>
                    不能为空
                </div>
            </div>
        </div>
        <div class="form-group">
            <label class=" title-style col-sm-2 control-label text-align-left">告警阈值</label>
        </div>
        <div class="form-group">
            <label class="col-sm-1 control-label">功率(%)：</label>
            <div class="col-sm-3 ui-fluid-no-padding ui-fluid">
                <input type="number"
                       class=" form-control"
                       pInputText
                       [(ngModel)]="cabinetObj.threshold_power"
                       [ngModelOptions]="{standalone: true}"/>
            </div>
            <label class="col-sm-1 control-label">PDU电口(%)：</label>
            <div class="col-sm-3 ui-fluid-no-padding">
                <input type="number"
                       class=" form-control"
                       pInputText
                       [(ngModel)]="cabinetObj.threshold_pdu"
                       [ngModelOptions]="{standalone: true}"/>
            </div>
            <label class="col-sm-1 control-label">网口(%)：</label>
            <div class="col-sm-3 ui-fluid-no-padding">
                <input type="number"
                       class=" form-control"
                       pInputText
                       [(ngModel)]="cabinetObj.threshold_network_port"
                       [ngModelOptions]="{standalone: true}"/>
            </div>
        </div>
        <!--<div class="form-group">-->
            <!--<label class="col-sm-2 control-label text-align-left">补充参数</label>-->
        <!--</div>-->
        <!--<div class="form-group">-->
            <!--<label class="col-sm-2 control-label">功率(KW)：</label>-->
            <!--<div class="col-sm-4 ui-fluid-no-padding ui-fluid">-->
                <!--<input type="number"-->
                       <!--class=" form-control"-->
                       <!--pInputText-->
                       <!--[(ngModel)]="cabinetObj.addtional_power"-->
                       <!--[ngModelOptions]="{standalone: true}"/>-->
            <!--</div>-->
            <!--<label class="col-sm-2 control-label">机架位(个)：</label>-->
            <!--<div class="col-sm-4 ui-fluid-no-padding">-->
                <!--<input type="number"-->
                       <!--class=" form-control"-->
                       <!--pInputText-->
                       <!--[(ngModel)]="cabinetObj.addtional_rack"-->
                       <!--[ngModelOptions]="{standalone: true}"/>-->
            <!--</div>-->
        <!--</div>-->
        <!--<div class="form-group">-->
            <!--<label class="col-sm-2 control-label">PDU电口数量(个)：</label>-->
            <!--<div class="col-sm-4 ui-fluid-no-padding ui-fluid">-->
                <!--<input type="number"-->
                       <!--class=" form-control"-->
                       <!--pInputText-->
                       <!--[(ngModel)]="cabinetObj.addtional_pdu"-->
                       <!--[ngModelOptions]="{standalone: true}"/>-->
            <!--</div>-->
            <!--<label class="col-sm-2 control-label">网口数(个)：</label>-->
            <!--<div class="col-sm-4 ui-fluid-no-padding">-->
                <!--<input type="number"-->
                       <!--class=" form-control"-->
                       <!--pInputText-->
                       <!--[(ngModel)]="cabinetObj.addtional_network_port"-->
                       <!--[ngModelOptions]="{standalone: true}"/>-->
            <!--</div>-->
        <!--</div>-->
        <div class="form-group ">
            <div class="col-sm-12 ui-no-padding-left-15px ">
                <button class="pull-right  ui-button-secondary" pButton type="button"
                        (click)="goBack()" label="取消" ></button>
                <button  class="pull-right ui-margin-right-10px" pButton type="button" (click)="save()" label="保存" ></button>
            </div>
        </div>
    </form>
    <p-dialog header="请选择机柜列归属" [(visible)]="displaycabinet" modal="modal" width="width" [responsive]="true" minHeight="500" (onHide)="onHide('cabinet')">
        <p-tree [value]="treeDatas"
                selectionMode="single"
                [(selection)]="selected"
        ></p-tree>
        <p-footer>
            <button type="button" pButton icon="fa-check" (click)="sure('cabinet')" label="确定"></button>
            <button type="button" pButton icon="fa-close" (click)="cancel('cabinet')"
                    class="ui-button-secondary" label="取消"></button>
        </p-footer>
    </p-dialog>
    <p-growl [(value)]="message"></p-growl>
</div>
